import request from '@/utils/request'

// 查询农机补贴列表
export function listComplieHandle(query) {
  return request({
    url: '/subsidy/subsidyApplication/listPage',
    method: 'get',
    params: query
  })
}

// 模糊查机具名称
export function listMachingModel(query) {
  return request({
    url: '/subsidy/subsidyApplication/listMachingModel',
    method: 'get',
    params: query
  })
}

// 查询生产厂家
export function listMachingByName(query) {
  return request({
    url: '/subsidy/subsidyApplication/listMachingByName',
    method: 'get',
    params: query
  })
}

export function queryhistoryOne(query){
  return request({
    url: '/subsidy/subsidyApplication/historyOne',
    method: 'get',
    params: query
  })
}

// 查询农机申请详细信息
export function getMachineryDetail(id) {
  return request({
    url: '/subsidy/subsidyApplication/' + id,
    method: 'get'
  })
}

// 修改农机申请表
export function updateSubsidyApplication(data) {
  return request({
    url: '/subsidy/subsidyApplication',
    method: 'put',
    data: data
  })
}

// 新增农机申请表
export function addSubsidyApplication(data) {
  return request({
    url: '/subsidy/subsidyApplication/submitnongji',
    method: 'post',
    data: data
  })
}


// 驳回农机申请表
export function rejectSubsidyApplication(data) {
  return request({
    url: '/subsidy/subsidyApplication/rejectOne',
    method: 'post',
    data: data
  })
}


// 审核接口
// 审核农机申请表
export function approveSubsidyApplication(data) {
  return request({
    url: '/subsidy/subsidyApplication/approveOne',
    method: 'post',
    data: data
  })
}


// 修改行政区域
export function updateStrativeArea(data) {
  return request({
    url: '/subsidy/strativeArea',
    method: 'put',
    data: data
  })
}

// 删除行政区域
export function delStrativeArea(id) {
  return request({
    url: '/subsidy/strativeArea/' + id,
    method: 'delete'
  })
}
